package licode.unisop.log.service.infrastructure.assembler;

import licode.unisop.log.client.dto.AuditLogDTO;
import licode.unisop.log.client.dto.CallingLogDTO;
import licode.unisop.log.client.dto.LoginLogDTO;
import licode.unisop.log.service.infrastructure.repository.po.AuditLogPO;
import licode.unisop.log.service.infrastructure.repository.po.CallingLogPO;
import licode.unisop.log.service.infrastructure.repository.po.LastLoginLogPO;
import licode.unisop.log.service.infrastructure.repository.po.LoginLogPO;
import org.mapstruct.Mapper;

import java.util.List;

/**
 * @author WR
 * @since 2016/7/9 16:09
 */
@Mapper(componentModel = "spring")
public interface LogAssembler {
    AuditLogPO fromAuditLogDto(AuditLogDTO source);
    AuditLogDTO fromAuditLog(AuditLogPO source);

    List<AuditLogPO> fromAuditLogDto(List<AuditLogDTO> source);
    List<AuditLogDTO> fromAuditLog(List<AuditLogPO> source);

    LoginLogPO fromLoginLogDto(LoginLogDTO source);
    LoginLogDTO fromLoginLog(LoginLogPO source);

    LastLoginLogPO toLastLoginLogDto(LoginLogDTO source);
    LoginLogDTO fromLastLoginLog(LastLoginLogPO source);
    List<LoginLogDTO> fromLastLoginLog(List<LastLoginLogPO> source);

    List<LoginLogPO> fromLoginLogDto(List<LoginLogDTO> source);
    List<LoginLogDTO> fromLoginLog(List<LoginLogPO> source);

    CallingLogPO fromCallApiLogDto(CallingLogDTO source);
    CallingLogDTO fromCallApiLog(CallingLogPO source);

    List<CallingLogPO> fromCallApiLogDto(List<CallingLogDTO> source);
    List<CallingLogDTO> fromCallApiLog(List<CallingLogPO> source);
}
